package isjinhao.jlox.grammar.expression.visitor;


import isjinhao.jlox.grammar.expression.represention.*;

/**
 * @Author ISJINHAO
 * @Date 2021/2/20 21:26
 */
public interface ExpressionVisitor<R> {

    default R visit(Expression expression) {
        return expression.accept(this);
    }

    default R visitArithmeticExpr(Arithmetic expr) {
        return null;
    }

    default R visitComparisonExpr(Comparison expr) {
        return null;
    }

    default R visitGroupingExpr(Grouping expr) {
        return null;
    }

    default R visitLiteralExpr(Literal expr) {
        return null;
    }

    default R visitUnaryExpr(Unary expr) {
        return null;
    }

    default R visitVariableExpr(Identifier identifier) {
        return null;
    }

    default R visitLogicExpr(Logic logic) {return null;}

}